package com.dtsheep.mybatis.domain;

import com.alibaba.fastjson.JSONArray;
import com.dtsheep.mybatis.enums.ActiveStatusEnum;
import com.dtsheep.mybatis.enums.GenderTypeEnum;
import lombok.Data;
/**
 * Created by dingguo on 2021-01-09 17:47
 * <p>
 * 员工表
 */
@Data
public class Staff {

    /**
     * 进销存企业id
     */
    private Long epsId;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 员工编号
     */
    private Long staffNum;

    /**
     * 员工姓名
     */
    private String staffName;

    /**
     * 联系电话
     */
    private String mobilePhone;

    /**
     * 密码
     */
    private String password;

    /**
     * 角色id
     * 冗余字段，方便多维度查询
     */
    private Long roleId;

    /**
     * 部门id
     * 冗余字段，方便多维度查询
     */
    private Long departId;

    /**
     * 性别类型
     */
    private GenderTypeEnum genderType = GenderTypeEnum.MAN;

    /**
     * 状态
     */
    private ActiveStatusEnum status = ActiveStatusEnum.NORMAL;

    /**
     * 是否是默认员工
     */
    private Boolean defaultStaff = false;

    /**
     * 仓库全新机id
     */
    private Long warehouseStaffRuleId;
    /**
     * 渠道全新机id
     */
    private JSONArray saleChannelIds;

    /**
     * 平台（渠道价）价格
     */
    private String platformIds;

    /**
     * 授权选品
     */
    private Boolean authorizeChooseFlag;


    public Long getEpsId() {
        return epsId;
    }

    public void setEpsId(Long epsId) {
        this.epsId = epsId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getStaffNum() {
        return staffNum;
    }

    public void setStaffNum(Long staffNum) {
        this.staffNum = staffNum;
    }

    public String getStaffName() {
        return staffName;
    }

    public void setStaffName(String staffName) {
        this.staffName = staffName;
    }

    public String getMobilePhone() {
        return mobilePhone;
    }

    public void setMobilePhone(String mobilePhone) {
        this.mobilePhone = mobilePhone;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public Long getDepartId() {
        return departId;
    }

    public void setDepartId(Long departId) {
        this.departId = departId;
    }

    public GenderTypeEnum getGenderType() {
        return genderType;
    }

    public void setGenderType(GenderTypeEnum genderType) {
        this.genderType = genderType;
    }

    public ActiveStatusEnum getStatus() {
        return status;
    }

    public void setStatus(ActiveStatusEnum status) {
        this.status = status;
    }

    public Boolean getDefaultStaff() {
        return defaultStaff;
    }

    public void setDefaultStaff(Boolean defaultStaff) {
        this.defaultStaff = defaultStaff;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Long getWarehouseStaffRuleId() {
        return warehouseStaffRuleId;
    }

    public JSONArray getSaleChannelIds() {
        return saleChannelIds;
    }

    public void setSaleChannelIds(JSONArray saleChannelIds) {
        this.saleChannelIds = saleChannelIds;
    }

    public void setWarehouseStaffRuleId(Long warehouseStaffRuleId) {
        this.warehouseStaffRuleId = warehouseStaffRuleId;
    }

    public Boolean getAuthorizeChooseFlag() {
        return authorizeChooseFlag;
    }

    public void setAuthorizeChooseFlag(Boolean authorizeChooseFlag) {
        this.authorizeChooseFlag = authorizeChooseFlag;
    }


    public boolean isAdmin() {
        return defaultStaff != null && defaultStaff;
    }

    public String getPlatformIds() {
        return platformIds;
    }

    public void setPlatformIds(String platformIds) {
        this.platformIds = platformIds;
    }
}

